extends ./index.jade

block content
	.rightSide
		.container-fluid
			.row
				form#tradeForm.form.form-inline
					.form-group
						label 统计时间
						input#tradedateStart.datepicker.date.form_datetime.controls.widthFixed(type='text' placeholder='请选择开始时间' required)
						label 至
						input#tradedateEnd.datepicker.date.form_datetime.controls.widthFixed(type='text' placeholder='请选择结束时间' required)
					.form-group
						input#queryTrade.btn.btn-primary.marginLeft(type='submit' value='查询')
					.form-group
						#tips.text-danger
			.row
				table#tableTrade.table.table-bordered.table-hover.center
					thead
						tr#tradeHead
							th 序号
							th 付款人数
							th 到店人数
							th 下单人数
							th 付款数
							th 下单数
							th 活跃天数
							th 收入
							th 客单价
							th APRU值
							th 复购率
							th 转化率
							th 学校
							th 食堂
							th 用户属性
							th 日期
					tbody#trades
				


	link(rel='stylesheet' href='/css/lib/bootstrap-datetimepicker.css')
	link(rel='stylesheet' href='/css/lib/select2.min.css')
	link(rel='stylesheet' href='/css/lib/bootstrap-select.min.css')

	script#template_trades(type="text/dot-tpl")
		|{{~it:value:index}}
		tr
			td {{=index+1}}
			td {{=value.payedPeople}}
			td -- 
			td {{=value.orderedPeople}}
			td {{=value.payedOrderCount}}
			td {{=value.orderCount}}
			td --
			td {{=value.income}}
			td {{=value.incomePerOrder}}
			td {{=value.incomePerPayedPeople}}
			|{{?value.repurchaseRadio!=null}}
			td {{=value.repurchaseRadio}}
			|{{??}}
			td --
			|{{?}}
			td --
			td {{=value.school}}
			td {{=value.canteen}}
			td {{=value.userProperty}}
			td {{=value.date}}	
		|{{~}}
	script(src='/js/lib/require.js' data-main='/js/trade_query')